import request from '@/utils/request'

// 查询可新增的已有线路车辆列表
export function queryAddVehicleList(query) {
  return request({
    url: '/basic/routeVehicle/queryAddVehicleList',
    method: 'get',
    params:query
  })
}
// 查询线路车辆列表
export function listRouteVehicle(query) {
  return request({
    url: '/basic/routeVehicle/queryBasicRouteVehicleVoList',
    method: 'get',
    params: query
  })
}

// 查询线路车辆详细
export function getRouteVehicle(routeId) {
  return request({
    url: '/basic/routeVehicle/' + routeId,
    method: 'get'
  })
}

// 新增线路车辆
export function addRouteVehicle(data) {
  return request({
    url: '/basic/routeVehicle/add',
    method: 'post',
    data: data
  })
}
// 批量新增已有车辆
export function addRouteVehicleList(data) {
  return request({
    url: '/basic/routeVehicle/addList',
    method: 'post',
    data: data
  })
}

// 修改线路车辆
export function updateRouteVehicle(data) {
  return request({
    url: '/basic/routeVehicle',
    method: 'put',
    data: data
  })
}

// 删除已选车辆
export function delVehicle(data) {
  return request({
    url: '/basic/routeVehicle',
    method: 'delete',
    data: data
  })
}

// 删除线路车辆
export function delRouteVehicle(routeId) {
  return request({
    url: '/basic/routeVehicle/' + routeId,
    method: 'delete'
  })
}
